package com.goldfish666.remote_control.entity.common;

import com.goldfish666.remote_control.entity.base.BaseKeyWithDistributedId;
import com.goldfish666.remote_control.enums.DeviceTypeEnum;
import lombok.*;
import lombok.experimental.SuperBuilder;

import javax.persistence.*;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Inheritance(strategy = InheritanceType.JOINED)
//@BeanCopySource(source = InputDto.class, features = {CopyFeature.IGNORE_ALL_NULL_SOURCE_VALUE})
public class Model extends BaseKeyWithDistributedId {

    /**
     * 品牌名称
     */
    private String brand;

    /**
     * 型号名称
     */
    private String name;

    /**
     * 设备类型
     */
    private DeviceTypeEnum deviceType;

    /**
     * 按钮数
     */
    private int buttonNumber;

    /**
     * 按钮
     */
    @OneToMany
    private List<Button> buttons;

    /**
     * 公共位
     */
    @ManyToMany
    private List<ByteValue> common;
}
